//
//  AppDelegate+JPush.h
//  OwnerAPP
//
//  Created by apple on 16/12/2.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "AppDelegate.h"

//极光推送
#import "JPUSHService.h"
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h>
#endif
// 如果需要使用idfa功能所需要引入的头文件（可选）
#import <AdSupport/AdSupport.h>


//极光推送
static NSString *appKey = @"49ca791d77d923b2b1f831b8";
static NSString *channel = @"Publish channel";
static BOOL isProduction = NO;

typedef NS_ENUM(NSInteger, JPushType) {//根据推送Type值区分跳转界面 NoticeViewController
    JPushType_MyNew = 1,//我的消息界面
    JPushType_PropertyNotice = 2//紧急通知界面
};

@interface AppDelegate (JPush)<JPUSHRegisterDelegate>


-(void)setJPUSWithApplication:(UIApplication *)application Options:(NSDictionary *)launchOptions;
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:
(void (^)(UIBackgroundFetchResult))completionHandler;
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification;
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler;
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler;
- (NSString *)logDic:(NSDictionary *)dic;
@end
